
import './App.css';
import React, { Fragment } from "react";
import { useHistory } from "react-router-dom";
import Header from './Header';
import Sidebar from './Sidebar'
import RecommendedVideos from './RecommendedVideos.js'
import SearchPage from './SearchPage.js'
import { BrowserRouter, Switch, Route,Link, Redirect } from "react-router-dom"
import reactDom from 'react-dom';

function App() {
  const name = "John"
  return (
    <div className="App">
      <BrowserRouter>
        <Header />
        <Route path="/"  exact  >
          
          <div className="app__page">
            <Sidebar/>
            <RecommendedVideos/>
          </div> 
        </Route>

        <Route path="/search/:searchItem" >

          <div className="app__page">
            <Sidebar/>
            <SearchPage />
          </div>
        </Route>

      </BrowserRouter>
    </div>
    
    
  );
}


export default App;
